<template>
	<view style="width: 100%;height:100%">
		<view class="p10 bs6">
			<view class="c6 mb10" v-if="list">待叫号{{list.length}}单</view>
			<view class="p10 bf bs6 dfbc mb10" v-for="(item,index) in list" :key="index">
				<view class="w60">
					<view class="f26 wei6 c0 mb10">{{item.pickNo}}</view>
					<view class="c6 f12">{{item.packagingFormat}} {{item.orderTime}}</view>
				</view>
				<view class=" dfa">
					<u-button shape="circle" type="primary" :color="subColor" :customStyle="{color:'#000'}" text="叫号" @click="call(item)"></u-button>
					<view class="pr10"></view>
					<u-button shape="circle" text="已取餐" @click="qc(item)"></u-button>
				</view>
			</view>
			<view v-if="list.length==0" class="np f-c-c">
				<view class="iconfont icon-queshengtu cb" style="font-size: 90rpx;"></view>
				<view class="f12 cb mt20">暂无订单</view>
			</view>
		</view>
		<!-- <view class="buts pb40">
			<view class="p-10-20 mb10 ">
				<view class="cf bs30 tac p15" :style="{background:subColor}" @click="show=true">自定义取单号</view>
			</view>
		</view> -->

		<u-modal :show="show" :negativeTop="200" title="取单号" confirmText="确定" showCancelButton :confirmColor="subColor"
			cancelColor="#999" @confirm="search" @cancel="show = false" @close="show = false"
			:closeOnClickOverlay="true" zoom>
			<view class="slot-content">
				<u--input v-model="phone" type="number" placeholder="请输入取单号" border="none"
					:customStyle="{'width':'500rpx','flex':1,'background': '#fafafa','padding': '10px 15px',}"
					clearable>
				</u--input>
			</view>
		</u-modal>
	</view>
</template>

<script>
	export default {
		props: {
			list: {
				type: Array,
				default: () => []
			}
		},
		data() {
			return {
				subColor: uni.getStorageSync('subject_color'),
				show: false,
			}
		},
		methods: {
			takeOrder() {},
			close() {
				this.show = false
			},
			call(v){
				this.$emit('call',v)
			},
			qc(v){
				this.$emit('qc',v)
			},
		}
	}
</script>

<style lang="scss" scoped>
	.buts {
		width: 100%;
		position: fixed;
		left: 0;
		bottom: 0;
		z-index: 9999;
	}
</style>